<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>jwplayer example</title>
    <script src="jwplayer/js/jquery-3.2.1.js"></script>
    <script src="jwplayer/jwplayer.js"></script>
    <style>
        #container {
            margin: 0 auto;
            text-align: center;
        }
    </style>
</head>

<body>
<div id="container">loading the player...</div>
<script>
    var thePlayer;
    jwplayer.key = "g3s5dE4530OX35dgX+egRpRqJaG0e/fTWlOZdSF9QQIbs4yx";
    $(function () {
        // thePlayer = jwplayer('container').setup({
        //    autostart: true,
        //     flashplayer: 'jwplayer/jwplayer.flash.swf',
        //     file: 'jwplayer/video.mp4',
        //     width: 480,
        //     height: 360,
        // volume: 80
        // });
        jwplayer("container").setup({
            // "file": "https://wowzaec2demo.streamlock.net/vod-multitrack/_definst_/smil:ElephantsDream/ElephantsDream.smil/playlist.m3u8",
            "autostart": 'true',
            width: 480,
            height: 360,

            "playlist": [{
                "title": "测试视频",
                "description": "这个真的是是测试视频啦啦啦",
                "sources": [
                    {
                        "width": 320,
                        "height": 180,
                        "type": "video/mp4",
                        "file": "jwplayer/video.mp4",
                        "label": "H.264 320px"
                    },
                    {
                        "width": 480,
                        "height": 270,
                        "type": "video/mp4",
                        "file": "https://cdn.jwplayer.com/videos/8L4m9FJB-TNpruJId.mp4",
                        "label": "H.264 480px"
                    },
                    {
                        "width": 720,
                        "height": 406,
                        "type": "video/mp4",
                        "file": "https://cdn.jwplayer.com/videos/8L4m9FJB-cIp6U8lV.mp4",
                        "label": "H.264 720px"
                    },
                    {
                        "file": "jwplayer/video.mp4",
                        "label": "AD"
                    }
                ]
            }]
        });
    });

</script>
</body>
</html>
